
<input type="hidden" id="hdn-music-type" value="1"/>

<table class="tbl-list">
<thead>
	<tr>
		<th width="20"></th>
		<th>歌曲</th>
		<th width="110">歌手</th>
		<th width="200">专辑</th>
	</tr>
</thead>
<?php if(!empty($rs->results)):?>
<?php foreach ($rs->results as $k=>$v):?>
  <tr>
    <td>
        <input class="rad-music-slt" type="radio" 
        	music_name="<?php echo urldecode($v->song_name);?>"
        	name="sid" value="<?php echo $v->song_id;?>"/>
    </td>
    <td><?php echo urldecode($v->song_name);?></td>
    <td><?php echo urldecode($v->artist_name);?></td>
    <td><?php echo urldecode($v->album_name);?></td>
  </tr>
<?php endforeach;?>
<?php else:?>
  <tr>
    <td>暂未找到..</td>
  </tr>
<?php endif;?>
</table>
<div style="height: 5px;overflow: hidden;"></div>
<div>
	<a class="btn-page" href="javascript:void(0);" cpage="<?php echo ($rs->current_page<=0) ? 1 : $rs->current_page;?>">上一页</a>
	<a class="btn-page" href="javascript:void(0);" cpage="<?php echo $rs->current_page+2;?>">下一页</a>
	<span><?php echo $rs->current_page+1;?>/<?php echo $rs->total;?></span>
</div>
<div class="b4"></div>
<div style="clear: both;"></div>
<script type="text/javascript">
$(function(){

	$('.rad-music-slt').click(function(){
		$('#music-media').remove();
		var media = '';
		media += '<div id="music-media"><embed height="33" width="257"';
		media += ' src="http://img.xiami.com/widget/0_'+$(this).val()+'_/singlePlayer.swf"';
		media += ' menu="false" wmode="transparent" quality="high" ';
		media += ' pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"';
		media += ' type="application/x-shockwave-flash"></embed></div>';
		$('body').append(media);

	});

	$('.btn-page').click(function(){
		var pagenum = $(this).attr('cpage');
		$('#pagenum-hidden').val(pagenum);
		$('#btn-music-search-hidden').click();
	});
	
});
</script>